<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        body>div{
            width: 100px;
            height: 100px;
            background: red;
            /*解决粘连问题*/
            overflow: hidden;
        }

        div>div{
            width: 50px;
            height:50px;
            background: green;
            margin-left: 20px;
            margin-top: 20px;
        }
    </style>
</head>
<body>

<div><div></div></div>
<span></span>

</body>
</html>